package com.zeng.ssm.service.support.async;


import com.zeng.ssm.service.support.async.dto.AsyncTaskConfigDto;
import com.zeng.ssm.service.support.async.dto.AsyncTaskLogDto;
import com.zeng.ssm.service.support.async.dto.AsyncTaskRecordDto;

/**
 * 异步任务-上下文
 *
 * @author zengwanlin
 * @date 2023-04-03T19:02
 */
public class AsyncTaskContext {

    private Object param;

    private AsyncTaskConfigDto taskConfigDto;

    private AsyncTaskRecordDto taskRecordDto;

    private AsyncTaskLogDto taskLog;

    private String status;

    private String retMsg;

    public <T> T getParam(Class<T> clazz) {
        return (T) param;
    }

    public void setParam(Object param) {
        this.param = param;
    }

    public AsyncTaskConfigDto getTaskConfigDto() {
        return taskConfigDto;
    }

    public void setTaskConfigDto(AsyncTaskConfigDto taskConfigDto) {
        this.taskConfigDto = taskConfigDto;
    }

    public AsyncTaskRecordDto getTaskRecordDto() {
        return taskRecordDto;
    }

    public void setTaskRecordDto(AsyncTaskRecordDto taskRecordDto) {
        this.taskRecordDto = taskRecordDto;
    }

    public AsyncTaskLogDto getTaskLog() {
        return taskLog;
    }

    public void setTaskLog(AsyncTaskLogDto taskLog) {
        this.taskLog = taskLog;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getRetMsg() {
        return retMsg;
    }

    public void setRetMsg(String retMsg) {
        this.retMsg = retMsg;
    }
}
